docker: pin pnpm dependency to v10 to avoid ERR_PNPM_IGNORED_BUILDS#4305
docker: pin pnpm dependency to v10 to avoid ERR_PNPM_IGNORED_BUILDS#4305bastidest wants to merge 1 commit into
Conversation
|
@bastidest is attempting to deploy a commit to the Umami Software Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR pins the
Confidence Score: 4/5The change restores a broken Docker build with minimal blast radius — only two lines in the Dockerfile are modified. The pin is functional but uses a floating major-version range rather than an exact version, and the underlying root cause is not fully addressed. The fix achieves its stated goal of unblocking the Docker build. The two observations — the floating Dockerfile — both pnpm install lines should ideally be pinned to a full Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[FROM node:22-alpine AS deps] --> B[apk add libc6-compat]
B --> C[COPY package.json pnpm-lock.yaml]
C --> D["npm install -g pnpm@10 ← pinned"]
D --> E[pnpm install --frozen-lockfile]
E --> F[FROM node:22-alpine AS builder]
F --> G[COPY node_modules from deps]
G --> H[npm run build-docker]
H --> I[FROM node:22-alpine AS runner]
I --> J["npm install -g pnpm@10 ← pinned"]
J --> K["pnpm --allow-build='@prisma/engines' add prisma ..."]
K --> L[COPY built artifacts from builder]
L --> M[CMD pnpm start-docker]
|
| COPY package.json pnpm-lock.yaml ./ | ||
| RUN npm install -g pnpm | ||
| # pnpm version pinned at 10 due to ERR_PNPM_IGNORED_BUILDS error with v11 | ||
| RUN npm install -g pnpm@10 |
There was a problem hiding this comment.
pnpm@10 is a major-version range, not an exact pin — it will silently float to any 10.x.y release published after the image is built. Two builds at different times can pick up different pnpm versions, making the build non-reproducible. Pin to a full pnpm@10.x.y semver (e.g. the latest stable 10.x at the time of merging) and update both occurrences in the file to keep them in sync.
The docker build has started failing for me since the update of
pnpmto version 11. Pinningpnpmto version 10 fixes the build.Ideally the dependencies should not be pinned, but fixated with a lockfile. There are several other dependencies that could silently update and fail the build.
This is just a quick fix to get the docker build working again.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.